package com.example.healing.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;


@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user")
public class User implements Serializable {

    private static final long serialVersionUID =  6990292165820876266L;

    @ApiModelProperty(value = "uuid")
    @TableField(value = "uid")
    @TableId("uid")
    private String uid;

    @NotBlank(message = "登录名不能为空")
    @ApiModelProperty(value = "登录名 必填")
    private String loginname;

    @ApiModelProperty(value = "用户昵称 必填")
    private String username;

    @ApiModelProperty(value = "用户、头像、文件地址")
    private String avatar;

    @ApiModelProperty(value = "个性签名")
    private String signature;

    @ApiModelProperty(value = "用户性别")
    private String gender;

    @NotBlank(message = "用户密码不能为空")
    @ApiModelProperty(value = "用户密码")
    private String password;
}
